const host = 'http://192.168.28.146:8080'
export const request = (parmas) => {
    const token = wx.getStorageSync('token')
    const phone = wx.getStorageSync('phone')
    console.log(token);
    return new Promise((resolve, reject) => {
        wx.request({
            url: host + parmas.url,
            data: parmas.data,
            method: parmas.method,
            header: {
                'content-type': 'application/json',
                'token': token,
                userPhone: phone,
            },
            success: (res) => {
                resolve(res.data)
            },
            fail: (err) => {
                reject(err)
            },
        })
    })
}